<?php

Counter::model()->info(false);

$newTicket = Ticket::model()->getCountNew();
if($newTicket) $ticket = 'Тикеты ('.$newTicket.')';
else $ticket = 'Тикеты';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <!-- blueprint CSS framework -->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
        <!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/backend.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>

    <body>

        <div class="container" id="page">

            <!-- header -->
            <div id="header">
                <div id="logo">Панель администрирования</div>
                
            </div>
            <!-- header -->

            <table >
                <tr>
                    <td rowspan="2" style="padding: 0; margin: 0;vertical-align: top; width: 10%; height: 100%;">
                        <!-- mainmenu -->
                        <div id="mainmenu">
                            <?php $this->widget('zii.widgets.CMenu',array(
                                    'items'=>array(
                                            array('label'=>'Главная', 'url'=>array('/site/index')),
                                            array('label'=>$ticket, 'url'=>array('/TicketAdmin/ticket/index')),
                                            array('label'=>'Новости', 'url'=>array('/NewsAdmin/news/index')),
                                            array('label'=>'Конфиг сайта', 'url'=>array('/ConfigAdmin/config/index')),
                                            array('label'=>'Фото', 'url'=>array('/FotoAdmin/foto/index')),
                                            array('label'=>'Фотоальбомы', 'url'=>array('/FotoCAdmin/albums/index')),
                                            array('label'=>'Статические страницы', 'url'=>array('/StaticPageAdmin/staticPage/index')),
                                            array('label'=>'Логи', 'url'=>array('/CounterAdmin/counter/index')),
                                            array('label'=>'Статьи', 'url'=>array('/PostAdmin/post/index')),
                                        
                                            array('label'=>'_______', 'url'=>array('')),

                                        
                                            array('label'=>'?!Коментарий', 'url'=>array('ComentAdmin/coment/index')),

                                            array('label'=>'?!Документы', 'url'=>array('DocumentAdmin/document/index')),
                                            array('label'=>'?!Категорий документов', 'url'=>array('DocumentCAdmin/cdocument/index')),
                                            array('label'=>'?!Файлы', 'url'=>array('2NewsAdmin/news/index')),

                                            array('label'=>'?!Статические страницы', 'url'=>array('3NewsAdmin/news/index')),

                                            array('label'=>'?!Пользователи', 'url'=>array('N4ewsAdmin/news/index')),
                                            array('label'=>'?!Видео', 'url'=>array('5NewsAdmin/news/index')),
                                            array('label'=>'?!Категорий видео', 'url'=>array('7NewsAdmin/news/index')),

                                            array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
                                    ),

                            )); ?>
                        </div>
                        <!-- mainmenu -->
                    </td>
                    <td style="padding: 0; margin: 0;vertical-align: top; height: 1%;">

                        <!-- breadcrumbs -->
                        <div id="breadcrumbs">
                            <?php $this->widget('zii.widgets.CBreadcrumbs', array(
                                    'links'=>$this->breadcrumbs,
                            )); ?>
                        </div>
                        <!-- breadcrumbs -->
                    </td>
                </tr><tr>
                    <td style="padding: 0; margin: 0;vertical-align: top; text-align: left;">
                        <div id="cont">
                            <?php echo $content; ?>
                        </div>
                    </td>
                </tr>
            </table>
            <!-- footer -->
            <div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by Зайкосмайл >:0)<br/>
		All Rights Reserved.<br/>
                <?php echo Yii::powered(); ?>
            </div>
            <!-- footer -->

        </div><!-- page -->

    </body>
</html>
